home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bat.zip / ASM.BAT < prev    next >
DOS Batch File  |  1984-03-07  |  896b  |  26 lines

  1. bat * Automatic assembly with tests
  2. bat if .%1 <> . skip 2
  3. bat beep cls
  4. bat -rd Read Enter name of program to assemble (no extension) ==> %1
  5. bat %l = %1 #
  6. bat %i = 1            |* make sure there are no extensions
  7. bat -checkext if %i > %l goto -checkexist
  8. bat %a = %1 $ %i 1        |* get each char from the supplied name
  9. bat if %a <> . %i = %i + 1 | goto -checkext
  10. bat %i = %i - 1
  11. bat %1 = %1 $ 1 %i        |* take subportion of name without extension
  12.  
  13. bat -checkexist stateof %1.asm%2
  14. bat if %r = 1 beep type %1.asm not found | goto -rd
  15. bat if %r = 9 beep type %1.asm not found | goto -rd
  16.  
  17. MASM %1,%1;
  18. BAT * Automatic test for any errors from above assembly
  19. BAT READSCRN
  20. BAT -TST READSCRN %A %B
  21. BAT IF .%A = . GOTO -TST
  22. BAT IF %A <> 0 BEEP TYPE|TYPE ASSEMBLY HALTING DUE TO ERROR|EXIT
  23. BAT IF %B <> 0 BEEP TYPE|TYPE ASSEMBLY HALTING DUE TO ERROR|EXIT
  24. LINK %1,%1,CON;
  25. EXE2BIN %1 %1.COM
  26.